<?php
include("../user/userlogincheck.php");
include("../include/config.inc.php");

$store_id=GetValueByKey(tableprefix."store","member_id",$userid,"store_id");
$consql.="and goods_state='1' and store_id='$store_id' order by goods_id desc";
$sql = "select count(*) as count from ".tableprefix."goods where 1=1 ".$consql;
$row=$db->fetch_array($db->query($sql));
$count=$row["count"];
$page=new ShowPage;
$page->PageSize=100;
$page->Total=$count;
$page->LinkAry = array("id"=>$id);
$sql="select * from ".tableprefix."goods where 1=1 ".$consql." limit ".$page->OffSet();
$result=$db->query($sql);
$showpage= $page->ShowLink();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>我发布的演出-网演中国粤西平台</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=9,Chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" type="text/css" href="../css/public.css">
<link rel="stylesheet" type="text/css" href="../css/user.css">
<script type="text/javascript" src="../js/clientwidth.js"></script>
</head>
<body>
<div id="mygoods">
<?php     
if($count>0){
?>
	<ul>
<?php
while($row = $db->fetch_array($result))
{
?>
		<li>		
			<a href="../goods.php?id=<?php echo $row["goods_id"];?>"><img src="../<?php echo $row["goods_image"];?>"></a>
			<div>
				<h1><a href="../goods.php?id=<?php echo $row["goods_id"];?>"><?php echo $row["goods_name"];?></a></h1>
				<i>价格：<font style="color:#FF0000;margin-right:5px;"><?php echo $row["goods_price"];?></font>元</i>
				<em>订金：<font style="color:#FF0000;margin-right:5px;"><?php echo $row["book_down_payment"];?></font>元</em>
			</div>		
		</li>
		<li class="operation_box"><a href="mygoods_del.php?id=<?php echo $row["goods_id"];?>"><em>删除</em></a></li>
<?php
}
?>
	</ul>
	<div class="pages" style="margin-bottom:50px"><?php echo $showpage;?></div>
<?php
}else{
echo "<div style='padding:50px 0px;text-align:center;color:#990000;font-size:12px;'>没有找到合乎条件的记录</div>";
}
?>
</div>

<div id="bottom"></div>

<footer id="bar-fixed">
	<a href="../../mobile" class="tab-item"><i class="icon-tabbar bar-home"></i>首页</a>
	<a href="../category.php" class="tab-item"><i class="icon-tabbar bar-message"></i>分类</a>
	<a href="../publish" class="tab-item"><i class="icon-tabbar bar-publish"></i>发起</a>	
	<a href="../user" class="tab-item active"><i class="icon-tabbar bar-user2"></i>我</a>
</footer>
<script>
if (document.body.clientWidth > 640) {
	$('body').css({
		width: 640,
		margin: '0 auto',
	});
}
</script>
</body>
</html>
<?php
$db->free_result($result);
$db->close();
exit;
?>